//二进制中1的个数

/*int NumberOf1(int n ) {
    // write code here
    int count=0;
    for(int i=0;i<32;i++)
    {
        if(((n>>i)&1)==1)
        {
            count++;
        }
    }
    return count;
}*/

int NumberOf1(int n )
{
    int count=0;
    while(n)
    {
        count++;
        n&=(n-1);
    }
    return count;
}


//打印出二进制偶数位和奇数位
int main()
{
	int n = 15;
	for (int i = 31; i >= 0; i--)
	{
		if (i % 2 == 0)
		{
			int tmp = (n >> i) & 1;
			printf("%d", tmp);
		}
	}	
	printf("\n");
	for (int i = 31; i >= 0; i--)
	{
		if (i % 2 == 1)
		{
			int tmp = (n >> i) & 1;
			printf("%d", tmp);
		}
	}
	return 0;
}


//求两个数二进制中不同位的个数

int main()
{
	int n = 0;
	int m = 0;
	scanf("%d%d", &n, &m);
	int count = 0;
	int tmp = n ^ m;
	while (tmp)
	{
		count++;
		tmp &= tmp - 1;
	}
	printf("%d\n", count);
	return 0;
}